package demo4.dao;

import org.springframework.stereotype.Component;

@Component
public class UserDAO implements IUserDAO {
    @Override
    public boolean findUserByName(String name) {
        System.out.println("UserDAO:根据用户名查询用户信息");
        return Math.random()<0.5;// 模拟查询结果,一半概率返回true，一半返回false
    }

}
